package com.qymerge.manage.system.service;

import com.qymerge.manage.core.bean.ActionResultRO;
import com.qymerge.manage.system.dto.SysMenuDTO;
import com.qymerge.manage.system.dto.SysUserDTO;
import com.qymerge.manage.system.dto.SysUserSnapDTO;
import com.qymerge.manage.system.dto.SysUserSnapshotDTO;
import com.qymerge.manage.system.ro.SysUserRO;

import java.util.*;

/**
 * Desc
 * User cong.li
 * Date 2017/4/5
 * Time 10:41
 */
public interface IUserService {

    /**
     * 检查用户是否存在
     *
     * @param sysUser
     * @return
     */
    SysUserRO checkUser(SysUserRO sysUser);

    /**
     *
     * @param sysUser
     * @return
     */
    SysUserSnapshotDTO checkUserSnapshot(SysUserRO sysUser);

    /**
     * 检查密码是否正确
     *
     * @param sysUser
     * @return
     */
    SysUserRO checkPassword(SysUserRO sysUser);

    /**
     * 编辑密码
     *
     * @param user
     * @return
     */
    boolean editUserPwd(SysUserDTO user);

    /**
     * 格式化菜单数据
     *
     * @param userId
     * @return
     */
    List<SysMenuDTO> getMenuByUser(long userId);

    /**
     *
     * @param menuDtoList
     * @return
     */
    String formatMenuJson(List<SysMenuDTO> menuDtoList);

    /**
     *
     * @param dataList
     * @param parentId
     * @return
     */
    List getRecursionChildList(List<SysMenuDTO> dataList, long parentId);

    /**
     *
     * @param userRO
     * @return
     */
    SysUserSnapDTO getSysUser(SysUserRO userRO);

    /**
     *
     * @param user
     * @return
     */
    ActionResultRO resetUserPwd(SysUserDTO user);

}
